package com.sikaryofficial.system.domain.dto;

import cn.hutool.core.text.CharSequenceUtil;
import com.sikaryofficial.common.core.annotation.Excel;
import com.sikaryofficial.common.core.annotation.Excel.Type;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * 会员列表出参对象
 *
 * @author qinjinyuan
 */
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Accessors(chain = true)
@Getter
@Setter
@ToString
@ApiModel(value = "渠道商列表出参对象", description = "渠道商列表出参对象")
public class SysChannelUserListDTO {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "名字")
    @Excel(name = "序号", width = 30, type = Type.EXPORT)
    private Integer seqNo;

    @Excel(name = "姓名", width = 30, type = Type.EXPORT)
    private String firstNameAndLastName;
    /**
     * 名字
     */
    @ApiModelProperty(value = "名字")
    private String firstName;
    /**
     * 姓
     */
    @ApiModelProperty(value = "姓")
    private String lastName;

    /**
     * 用户邮箱
     */
    @Excel(name = "邮箱", width = 30, type = Type.EXPORT)
    @ApiModelProperty(value = "用户邮箱")
    private String email;
    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID")
    @Excel(name = "用户ID")
    private Long userId;
    /**
     * 部门ID
     */
    private Long deptId;
    /**
     * 手机号码
     */
    @Excel(name = "手机号码")
    @ApiModelProperty(value = "手机号码")
    private String phoneNumber;
    /**
     * 用户账号
     */
    private String userName;

    @Excel(name = "国家")
    @ApiModelProperty(value = "国家")
    private String country;
    /**
     * 语言
     */
    @Excel(name = "语言")
    @ApiModelProperty(value = "语言")
    private String language;

    /** 帐号状态（0正常 1停用） */
    @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
    @ApiModelProperty(value = "帐号状态（0正常 1停用）")
    private String status;

    public String getStatusDesc(){
        if(CharSequenceUtil.isBlank(status)){
            return null;
        }
        return "0".equals(status)? "normal" : "disabled";
    }

}
